<!DOCTYPE html>
<body>
<script>
  (async () => {
      const params = new URL(location.href).searchParams;
      const frame_url = params.get('frame');
      const script = document.createElement('script');
      script.type = 'webbundle';
      script.textContent = JSON.stringify({
        source: params.get('wbn'),
        resources: [frame_url],
      });
      document.body.appendChild(script);
      const message_promise = new Promise((resolve) => {
	  window.addEventListener('message', (e) => {
              resolve(e.data);
	  });
      });
      const iframe = document.createElement('iframe');
      iframe.src = frame_url;
      document.body.appendChild(iframe);
      await message_promise;
      document.title = 'OK';
  })();
</script>
</body>
